package edu.sctu.wulixia.month6.day20150615;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by user05 on 2015/6/16.
 */
public class BufferReaderTest {
    public void getMess() throws IOException {
        FileReader fileReader = new FileReader("D://wulixia//www.txt");
        BufferedReader bufferedReader = new BufferedReader(fileReader);
        int count = 0 ;
        String str ;
        while ((str = bufferedReader.readLine()) !=null){
            count++;
            System.out.println(str);
        }
        System.out.println("文本行数" + count);
        fileReader.close();

    }
}
